import Vue from 'vue'
import VueRouter from 'vue-router'
import search from '../views/home/Search'
import home from '../views/home/index.vue'
import my from '../views/My'
import singer from '../views/home/Singer'
import classify from '../views/home/Classify'
import classinfo1 from '../views/home/Classify/Classifyinfo1'
import classinfo2 from '../views/home/Classify/Classifyinfo2'
import songSheet from '../views/home/songSheet'
import mv from '../views/home/mv/index.vue'
import searchInfo from '../views/home/Search/SearchInfo/inedx..vue'
import mvlist from '../views/home/MvList/index.vue'
import find from '../views/Find/index.vue'

import ysRouter from './ysRouter'

Vue.use(VueRouter)

const routes = [

  ...ysRouter,
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: home
  },
  {
    path: '/home/search',
    component: search,
    meta: { search: true, footer: true, top: true }
  },
  {
    path: '/my',
    component: my,
    meta: {
      title: '我的'
    }
  },
  {
    path: '/home/singer',
    component: singer,
    meta: { footer: true }
  },
  {
    path: '/find',
    component: find
    // meta: { search: true }
  },
  // {
  //   path: '/home/ranking',
  //   component: ranking,
  //   meta: { footer: true }
  // },
  {
    path: '/home/classify',
    component: classify,
    // meta: { search: true, footer: true }
  },
  {
    path: '/home/classifyinfo1/:id',
    component: classinfo1,
    props: true,
    meta: { footer: true }
  },
  {
    path: '/home/classifyinfo2/:id',
    component: classinfo2,
    props: true,
    meta: { footer: true }
  },
  {
    path: '/home/songSheet/:id',
    component: songSheet,
    props: true,
    meta: { search: true, title: '歌单', footer: true }
  },
  {
    path: '/home/mv/:id',
    component: mv,
    props: true,
    meta: { search: true, footer: true, top: true, ting: true }
  },
  {
    path: '/home/search/searchinfo/:value',
    component: searchInfo,
    meta: { top: true, title: '〈', search: true, footer: true }
  },
  {
    path: '/home/mvlist',
    component: mvlist,
    meta: { search: true, footer: true, top: true, title: '〈' }
  }
]

const router = new VueRouter({
  routes
})

export default router
